package GameEngine.Animation.Programmed;

import GameEngine.helper.PAppletBridge;


public class WaveAnimation extends Animation {

	public WaveAnimation(int n, int max) {
		super(n, 0, max);
	}

	public void animate(int x, int y) {
		if (isRunning()) {
			float size = currentValue();

			PAppletBridge.pushMatrix();
			PAppletBridge.translate(x, y);

			// zeichnen
			PAppletBridge.fill(0xff5CBADE, 100);
			PAppletBridge.noStroke();
			PAppletBridge.triangle(0, 0, -size, -size, +size, -size);

			PAppletBridge.popMatrix();
		}
	}
}
